//1-((成本*税率)/(零售*箱包))
var NEW_MU;

if (!isNull(NEW_RETAIL) && !isNull(NEW_CASE_COST)
    && isDateIntersection(NEW_RETAIL_EFF_DATE, NEW_RETAIL_EXP_DATE, NEW_COST_EFF_DATE, NEW_COST_EXP_DATE)) {
    NEW_MU = 1 - ((parseFloat(NEW_CASE_COST) * parseFloat(TAX_RATE)) / (parseFloat(NEW_RETAIL) * parseFloat(VNPK_QTY)))
} else if ((isNull(NEW_RETAIL) && !isNull(NEW_CASE_COST))
    || (!isNull(NEW_RETAIL) && !isNull(NEW_CASE_COST)
        && !isDateIntersection(NEW_RETAIL_EFF_DATE, NEW_RETAIL_EXP_DATE, NEW_COST_EFF_DATE, NEW_COST_EXP_DATE))) {
    if (isNull(NEW_MU_MARGIN) || (!isNull(NEW_MU_MARGIN) && NEW_MU_MARGIN === 0)) {
        NEW_MU = MIN_MARGIN;
    } else {
        NEW_MU = NEW_MU_MARGIN;
    }
} else {
    NEW_MU = MIN_MARGIN;
}
if (!isNumber(NEW_MU)) {
    NEW_MU = 0
}
if (!isNull(NEW_MU)) {
    if (typeof NEW_MU === 'string') {
        NEW_MU = parseFloat(NEW_MU).toFixed(4);
    }
    NEW_MU = NEW_MU.toFixed(4)
}
'{"CODE":3, "ACTION":"UPDATE","LEVEL":"", "MSG":".....' + MIN_MARGIN + '....' + NEW_MU + '","DATA":{"NEW_MU":' + NEW_MU + '}}';
